If you got your phone from o2 you just need to do a request online and they will unlock it remotely within 2 weeks (in reality this usually takes 2/3 days).
The only problem is you need to sync your phone with itunes everytime you use a new sim card, which can be a problem if you aren't taking a laptop with itunes on it.
I am currently in HK at the moment, and i successfully managed to use a HK with sim card with my iPhone.