Can you unlock an iphone 5s that you received as an upgrade?

My dad upgraded his iPhone 4 to the 5s and then went back to his 4 so he could give me the 5s as a gift. Right now it's locked with AT&T and I have T mobile. Would they unlock it for us if we went to an AT&T store or called?

These are the terms you must comply with in order for them to unlock your iPhone for you to there service.

You own the phone, or can identify the person who owned it.

The phone hasn't been reported as lost or stolen.

You are no longer tied to a contract (either because of expiry, or you've paid the early-termination fee to cancel it).

Your account is in good standing, and you have no unpaid balances.

You meet all these, then you can switch with no problems.

If you can't unlock your phone this way, then you can unlock it yourself. You may have to pay a small fee to have it unlocked by someone if you can't unlock it yourself. I don't know if a user can unlock a iPhone 5s by themselves yet tho.