Some of you may recall that prior to Thanksgiving, Microsoft dropped the price on an AT&T locked Lumia 640 to a paltry $40 USD. For what the phone provides, it's already dirt cheap at its current $60 USD, but $40 turned out to be my breaking point. Just one problem. I'm on T-Mobile.
I've never actually unlocked a smartphone prior to this, but I felt that it would be worth the effort for such a cheap backup phone, especially when the T-Mobile version of this same phone costs a lot more ($100 USD at the time, and isn't even officially sold anymore). Combined with the fact that according to the paper specs, the AT&T locked version does in fact support all the T-Mobile LTE bands, my Excessive and Unnecessary American Consumerism Disorder promptly took over and forced me to buy the device.
Unlocking it turned out to be much easier than I expected. Head over to AT&T's device unlocking portal, and after confirming your eligibility, check the box at the bottom and proceed to the next page.
Of particular note is the four options at the top. Being part of the T-Mobile master race, I didn't have any sort of AT&T account, so I picked the non-AT&T Mobility customer option, which significantly trims down the forms that need to be filled out.
The IMEI number can be found in your device's About page, found in Settings. You may have to tap a "show more info" button to expose all the complicated numbers.
Input this information, along with your name and email address, into the form, and you will get an email confirming that AT&T is working on providing you with an unlock code, and that it'll take roughly two business days. You may get a supplemental email saying that they're looking into it more, but they shouldn't ask you for any more information than you've already provided.
About two days later, if all goes well, you'll get an email with a morbidly obese unlock code, and warnings that you only get ten tries to unlock your device.
Plug your T-Mobile (or whatever) SIM card into the Lumia 640, and boot up the device. You'll immediately be greeted a warning saying that you're not using an AT&T SIM card, alongside a number pad instructing you to provide an unlock code. Enter the code that was emailed to you, and that's it.
Unfortunately, I haven't been able to get T-Mobile specific features such as Wi-Fi calling working on the newly unlocked device, so don't expect to get a fully baked T-Mobile-specific experience. Visual voicemail works. As does all the normal phone stuff, including LTE internet access.
And that's all I need.