If you can get the unlock code directly from AT&T, that would not cost you anything. Since you are buying from eBay I am sure that aint possible.
Look up various unlocking services over the web, they will cost you anywhere from USD 20-50. This is the SIM unlock method, which does not require unlocking the bootloader or rooting the phone.
Lastly, there is the bootloader unlock method, which makes your phone SIM unlocked by default. This has the added advantage of enabling custom ROMs and flashing. For that, Google for wotanserver and Alejandrissimo. I personally recommend Alejandrissimo who is in fact a great guy with plenty of patience. He will charge you USD 24 for the whole process. Very easy and gets done within 10 minutes if all goes well. wotanserver charges EUR 15.
If you have any more question, feel free to ask.
What is the best deal you are getting for AT&T Xperia Play? When I was looking for one, they were quite expensive. The CDMA Verizon ones were a bit cheaper but I didn't want those. So I sourced mine from UK which was locked to O2.