The 4.0.2 version of iOS puts an end to these frivolities and closes the loophole, thus sending the jailbreak masterminds back to the drawing board. Interestingly enough, it doesn't fully seal the iPhone 3G. If you use the latest version of Redsn0w, it will still jailbreak the iPhone 3G running iOS 4.0.2 and, since the the default 05.13.04 baseband remains unchanged, you can then unlock it with Ultrasn0w as well. The same steps seem to work on the iPod touch 2G (non-MC version). Follow the links in the source for the detailed instructions.
source: RedmondPie & SprintUsers