why will it be locked to 02 is that because it was on 02 before or has it got to be jailbroken for it to be unlocked or can it be just unlocked after upgrade
if it was originaly locked to o2 and you update or restore it then you will lose the software unlock (ultrasn0w) and it will be locked back to o2
unless you jailbreak it again and unlock it with ultrasn0w or have it permently unlocked by o2 which costs around £15 or free if its an old contract phone where the contract has expired.
but yes if you want to unlock it yourself you will need to jailbreak it, to install ultrasn0w.
only certian basebands are unlockable,heres a list:
Unlockable Basebands !
the ipads baseband 06.15.00 is unlockable thats why many update to it if they dont have an unlockable baseband, but it cause's problems, like no GPS, only being able to update with custom firmware....etc
but with that version of redsn0w you can now downgrade the baseband to 5.13.04 which is also unlockable with ultrasn0w and fixes the ipad BB issues.
this is where you need to think carefully tho, because if you want to keep your unlock you will lose it updating to IOS6, and there is only a tethered jailbreak available at the moment, which means you would need redsn0w and a laptop or pc to turn your phone on each time you turn it off or the battery dies or you reboot it.
also if you have downgraded the baseband to 5.13.04 then itunes will update that to,so you will have to go through the process of updating to the ipad baseband then downgrading it to 5.13.04 again to unlock it.
out of interest....open cydia and look along the top of the homepage, it will say : SHSH IOS 4.1 and any others that might be saved.
might be possible you could update to IOS 5 instead if you have any blobs saved.