AT&T knows the IMEI number (unique number, each phone has got a different IMEI) of the phone that has been sent to you. If your neighbour is using AT&T they can easily find out if this phone has been logged into their network or not.
You can also ask AT&T to blacklist the IMEI.