Once you update the iphone, you'll loose the unlock and also the jailbreak. You'll have to jailbreak it again, to install unlock app through cydia or icy...
You MUST have a wi-fi connection, you'll know why....
The jailbreaking software is called redsn0w, and the unlocking app is called ultrasnow. More info regarding the latest unlock and jailbreaking can be found on
Dev-Team Blog
Go to that site, download redsn0w, read the latest post regarding iPhone 3GS update...
If you need any more help, update this thread...