I couldn't tell you about the UK, but in the US, the answer is "yes". If you get a replacement AT&T device a the Genius Bar, you can then put a request into AT&T for it to be unlocked. They will fulfill the request even if you are under contract, because the IMEI you are providing is not the one tied to a contract. So depending on how carriers work there, you might be able to get it unlocked via the carrier. So no it does not come unlocked from Apple, but you should be able to get it unlocked.