AT&T appears to be performing iPhone unlocks for some customers whose contracts are still in effect. According to an Ars forum thread, numerous posters were able to unlock their devices after submitting unlock requests to AT&T, despite the fact that many of them still had time—sometimes a lot of time—left on their contracts. This seems to go against AT&T's publicly stated policy that it only performs unlocks for users who are no longer in "active term commitments."
According to the thread, both iPhone 4 and 4S users have asked AT&T to unlock their devices after submitting a request through AT&T's Web form. A confirmation e-mail from AT&T tends to arrive within a day or so, at which point, users are instructed to back up their phones and perform a full restore from iTunes. The confirmation screen after performing the restore states that the device has been unlocked—it appears as if a new SIM card is not a requirement, though some said they only saw success after inserting a new SIM.
AT&T first announced in April that it would begin unlocking some iPhones, depending on if they meet the company's stringent requirements. The company confirmed that the iPhone being unlocked couldn't be under contract (either because your contract was up or you paid an Early Termination Fee) and your account must be in good standing for the request to be approved. But several posters in the thread said they had neither canceled their contracts nor had they completed their contracts with AT&T.