I'm not sure if it does work, I've just read people saying it does, but you could call up AT&T and give them the phone's IMEI number and say you want the unlock code, I'm not sure if they will give it to you if you're not a customer, but I've read posts saying that they do so you can try that out. Just say you're wanting to use it overseas so you need it unlocked.
BTW, you need a AT&T SIM to complete the unlock procedure. If you don't have one, go to an AT&T store and ask to use a unactivated SIM or borrow a SIM from a friend with AT&T.