Sounds like it's not really unlocked. It's not unheard of for a carrier to give you a bogus code.
Here's how to check.
You could also be in an AT&T dead spot where the signal is too weak to register. If you moved around by say, a couple of blocks, and it still said "SOS", then coverage is probably not the problem. After inserting the AT&T pre-paid SIM card you might do a battery pull to restart and refresh settings. Always worth a try.