I'd be curious about the answer to this one as well. After my O2-UK contract was up, they were as happy as a clam to unlock my phone. All I had to do was plug into iTunes and it just said "iPhone now unlocked" and I wept with joy.
Just called AT&T. It's $325 to break contract initially, and $10 less for every month it's in use. They said they won't unlock your phone after you break contract or it ends since "they don't do that for the iPhones"