T-Mobile can't unlock ATT phones. ATT can only unlock ATT phones. There is a loophole to this - get it unlocked by someone with the hardware!
T-Mobile will unlock the phone you have with them (they will unlock any phone you bought from them if you are currently on a plan). Just ask them for an unlock code