Below is the email I received from T-mobile after requesting an unlock code for my G2. This email was received within twelve hours of requesting it.
The actual message I received was different from what is stated below but logical. When I entered my unlock code and pressed OK. It stated "Unlock Successful! Reboot immediately". However the phone was frozen and I had to remove the battery.
After turning it back on I had completely disabled G2 that had to be returned to T-Mobile. It is an known issue with G2s. Don't attempt to unlock a G2 until this issue has been resolved.
-------------------------------------------------------------------------------------------------------
T-Mobile Sim Unlock Request
Sim Unlock Reference: 4166212
IMEI: 359116032221468
Unlock Code: 49909043
Thank you for taking the time to contact T-Mobile. Below you will see the Instructions for unlocking your HTC device.
1. Insert the foreign SIM card
2. Power on the device and the display should read "Please input unlock code"
3. Enter the unlock code and the device should display "Phone is unlocked."
4. Allow the phone to scan the network (or manually click on the antenna icon to do this)