I know this is super old but I just had the same problem so I thought I'd post my solution in case it can help anyone. My situation didn't involve AT&T, as I live in Canada but it sounds like the same issue just involving different companies.
I bought a phone that was locked to Virgin Mobile (Canada) except it turns out it really wasn't. When I called Virgin to unlock it they couldn't do it because they had no record of the phone at all. It was frustrating and surprising to say the least. How can the phone be locked and be used on the Virgin network, yet Virgin has no record of it?
Here's what happened: when the original owner got a replacement phone at the Apple store they gave her one that was locked to the parent company which is Bell, but she was not informed and continued to use it on Virgin, which was fine because Bell and Virgin are kind of the same company, except not really.
So when I called Virgin to unlock it they didn't have it in their database. When I called Bell they had it in their database and it was no problem.
The way I found out was to phone Apple support and when I gave them the serial number they were able to tell me who the phone was locked with.