T-Mobile will do it for you for free after you wait 40 days. Just call them.
I can confirm this. T-Mobile provided me the SIM unlock code for my phone. I believe you have to be a customer for at least two months but other than that, it's extremely simple and straight forward. You only have to provide your IMEI number.