iPhone 4S: iPhone 4S currently has two basebands: 2.0.12 on iOS 5.1.1 can be unlocked using Gevey SIM. However, only iPhone 4S GSM versions can be unlocked on iOS 5.1.1.
Now if you upgrade to iOS 6, you will also be upgrading to a new baseband, 2.8.01, which in simple terms mean,your previous unlock (Gevey SIM) will no longer work. Gevey SIM will not unlock iPhone 4S on iOS 6.
iPhone 4: iPhone 4 users are currently suffering with basebands 4.11.08 and 4.12.01 which still havent gotten unlocked. True, we did have SAM unlock for a short while and it was the perfect solution. However, it didnt last for long, although those who still got their activation tickets can still reunlock on SAM.
iOS 6 brings new baseband 4.12.02 (higher baseband) which will make it even harder to unlock. So, you are advised against upgrading to iOS 6.
iPhone 3GS: iPhone 3GS users can get their iPhone unlocked using Ultrasnow 1.2.7 for basebands up to 5.13.04. iPhone 3GS users are also going to get their baseband upgraded to 5.16.06. Although baseband would be upgraded those looking to still install iOS 6 could do with a cooked custom IPSW using redsnow. So, you needn`t worry about unlocking your phone on iOS 6.
iOS 6 is expected to release in September/October accompanying the release of the expected iPhone 5.