ATT will unlock your phone if you are a subscriber not on contract for that phone and in good standing. I was turned down on a 3GS that I bought from MyWorldPhone that was never on contract because ATT didn't like what a third party had done.
I don't know if they relaxed the rules since they started unlocking in April, but if you go to the ATT Forum (Apple Section) you'll see that a number of people are being turned down.