Wow you are one of the lucky few iPhone4 users that still has an unlockable baseband. Firstly, I must stress that you should NEVER update your firmware in iTunes, at least not normally. If you update in iTunes your baseband will be upgraded and a software unlock will not be possible.
Since you arent jailbroken currently I would assume that you don't have any SHSH keys saved, so your best bet is to just jailbreak your current firmware 4.0.2 which you can do using Redsn0w 0.9.5b5-5.
After jailbreaking with Redsn0w just go into Cydia and type in Ultrasn0w and download and install Ultrasn0w 1.2.3 and you will be unlocked! That's all there is to it!
Just remember NEVER UPDATE NORMALLY through iTunes. In the future like when you want to upgrade to iOS5 when it is released, you should wait for sn0wbreeze or Pwnage Tool to be updated to support iOS5. If you restore a custom firmware created using one of those tools, your baseband will be preserved.