Most of iPhone 4 users didn't update to iOS 4.2.1 as it updates baseband to unlockable baseband. So in case you got an iPhone 4 on older 01.59.00 baseband this will be great for you, as I have been tipped off about a trick which will update your iPhone 4 to iOS 4.2.1 with preserveing the old baseband 01.59.00 which will be unlockable with the existing version of ultrasn0w. Check out the few easy steps to do this after the break.
STEP 1: Right click on Notepad from Start - Programs - Accessories, then choose Run as administrator from the contextual popup menu.
STEP 3: Now add 22.214.171.124 gs.apple.com to end of the file as shown in the screenshot below:
iTunes then hold left “alt” button (“Shift” button on Windows) on the keyboard and click on “Restore” then release the alt button, Now Select the original iOS 4.2.1 firmware found here.
STEP 5: iTunes should pop-up with some error as error 1013, 1015 or some other error. This indicates that you have done it successfully, hit OK to continue.
STEP 6: Now you iPhone will stuck in Recovery Mode showing the well-known "Connect to iTunes" message. You have to run TinyUmbrella (Windows - Mac) or RecBoot 2.1 for Mac OS X to get out of recovery mode.
You'll now be able to jailbreak your iPhone 4 using Redsn0w 0.9.6 for tethered and Redsn0w 0.9.7 for untethered one then unlock it using Ultrasn0w carrier unlock. [Thanks @AppleBullet for hat tip, via @Ven000m]