How long ago was it purchased?
Are you sure it was purchased from Apple directly not T-Mobile?
All devices sold through T-Mobile are locked to them and can not be unlocked unless you are a customer.
If indeed was purchased from Apple it should have been unlocked and their support needs to help you T-Mobile can not it that case.
You should have your friend return it if they won't help.
We definitely understand the need to have your device unlocked so that you may be able to make use of it elsewhere. If the device is brand new and locked to our network, it may have been purchased directly through us. In this instance, you would need to have service with T-Mobile, because in order to Sim Unlock a device, it will need to meet the requirements listed here: SIM Unlock your phone.
I solve the problem. The first step was to call to T-Mobile support - they are explained me the problem is not on TMobule side - because they didn't sell this phone to me. They advised to call to Apple support.
I started chat with Apple support and in this time I changed the direction of my question - i wrote them "I bought the iPhone 5s for full price, my IMEI XXXXXXXXXX, and my Serial is XXXXXXXXXXX, is my phone factory unlocked?"
The person from support told me "Yes". And i told that now i can't use it with any kind of sim cards, even the T-Mobile.
He checked something in theirs system and opened the case with reason "Need to correct Activation Profile".
After it he asked me to call them with case ID. I did it, and after 24 hours i did factory reset and reactivated my phone. And now it works great with my local sim card.
PS: I think the problem was in that fact - when i just opened box - i activated phone with T-Mobile sim. Because i didn't know that sim card is inside the phone. My previous phone was iPhone 4s - it comes without any pre-installed sim cards.
AND there isn't any stick in the box of 5S to open sim card slot - so i decided to put my local sim later ;-)
Thanks everybody for you advises!