You might want to double check whether you have a 3G or 3GS. If Itunes asks you to upgrade your phone to 4.2.1, then you have a 3G. Otherwise, it will ask you to upgrade it to 5.0.1 now
In any way, if your phone is not factory unlocked, then it will lock back to original carrier once you update it to the latest firmware.