I had an old Nokia that was locked to Vodafone. All I had to do was walk into my local Vodafone shop and ask them to unlock it (which theyy said would cost £15).
I agreed to this but they couldn't unlock it in store so they gave me my £15 back and the address to send it to. A bit dubious, I sent the phone off in a padded envelope and a piece of paper explaining that I wanted the phone unlocking and how it could not be done in store.
A few days later, I received the phone, fully unlocked and a piece of paper merely saying 'Your mobile phone has been unlocked. Thank you.'
Unlocked phone for free! Brilliant!
So my advice would be to pop into T-Mobile and see what they can do for you - you may not have to pay a penny!