Is T-Mobile your carrier or do you mean unlocking it to use on another carrier?
T-Mobile is my carrier.
They've given me fits and refused to unlock 3 out of 4 phones I've had on the network over the last 3 years.
All phones were registered as active for almost a year prior to the request.
The only phone they allowed an unlock on was my Xperia Z1s.
The other 3 were Windows phones.
I don't know why I have so much trouble, but I refuse to buy anymore phones from T-Mobile directly.
Nothing but unlocked for me these days.