What Can I Do If My iPhone 5 T-Mobile Locked Sim Is Lost. Here's The Solution.
If your device paid off and you have a good account history. You may be eligible to have it unlocked from T Mobile via a phone call.
Also, you can get a pre-paid SIM card at places like Walmart or order one online. If you have a current plan, you just have to call TMobile and have them activate the SIM card to your account.
These are the conditions for having your device unlocked on TMobile https://support.t-mobile.com/docs/DOC-1588.