The official ultrasn0w unlock has been released by iPhone Dev Team for iPhone 3GS, with older bootrom running 04.26.08 baseband on iOS 4.0 (formerly iPhone OS 4). For those of you who preserved their baseband by jailbreaking iPhone 3GS on iOS 4 using PwnageTool can now unlock, provided that your phone is running the older 04.26.08 baseband.
The title says it all. The popular unlocking tool for iPhone 3GS, 05.11.07 baseband on iPhone 3.1.3/3.1.2 has been successfully ported to work with the latest iPhone OS 4 Beta 4. This port is based on the binaries provided by msft.guy and the original blacksn0w unlock by Geohot.