You can unlock your iphone4 using Remote unlocking method. Which is the safe and secure method to unlock iPhone. You can get this service from TheUnlockSpot.com
here you need to specify your country, Network name to which it is locked, IMEI number of your iPhone. Here they unlock your iPhone using latest versions of iTunes. This is permanent unlocking solution. Both upgrading and downgrading will not lock your iPhone again.