Wait for your unlock to process (if necessary). If your device has been previously unlocked by your carrier, plugging it back into iTunes will reapply the unlock code, allowing you to use the phone on other networks again. If you receive a window saying "An update to the carrier settings on your iPhone is available," click "Download and Update."
If at any point you are asked if you want to upgrade to a newer version of iOS, click "Cancel." Only download carrier updates.
If your device is supposed to unlock but does not, perform the Erase All Content and Settings steps again. Your iPhone should unlock after a second reset.