1. Find out for sure from your friend if it worked before, not "as far as you know", which to me, means you don't know if it did, right?
2. Even if not unlocked, if it is ATT branded and you are using an ATT SIM, it should be fine. Get a new SIM from ATT and see how it goes. Just do a SIM swap, I have seen that work many times.