Jailbreak and Unlock Iphone 3G

So I have an iPhone 3G currently jailbroken and unlocked running on 3.1.2 (7D11) and baseband 05.11.07. I would like to upgrade to a later firmware (4.0+) but am not sure if this can be done and still be able to jailbreak and unlock.
If I do this should I go to the latest of 4.2 through itunes, or should I only update to 4.0.1?
And will updating through itunes upgrade the baseband as well so it can't be unlocked?
Any help would be appreciated

I ran a 3G on 4.1 and I found it worked very well. Create a custom IPSW and use Tinyumbrella or pwnagetool or whatever to preserve your baseband so that you can still unlock. That'll boost your resale value.

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.