Can I restore a unlocked T-Mobile iPhone 4 with it still being unlocked?

I'm getting a unlocked T-Mobile iPhone 4 soon and wanted to restore it, but was worried that it might not be unlocked after restoring it. Will it still be unlocked after restoring it to factory settings?

If the phone is factory unlocked then don't worry it will never be locked, but if it is a temporary unlock then it will be locked. To factory unlock any cell phone you can go to: www.cellsunlock.com

Depends on how it was unlocked.

If it was software unlocked, aka ultrasn0w then it would re-lock as an example.