Unless it was purchased from Apple as unlocked, then it was likely hacked, not officially unlocked. When you try to update the iOS it will then just re-lock right back to the original carrier it was sold as locked to.
I also would not trust any online site to tell you it is unlocked - to my knowledge, there is no such truly reliable web site, as the only ones with databases of officially unlocked phones are Apple, and they do not make that data publicly searchable.
If it was purchased directly from Apple (or an official Apple authorized agent) as unlocked, then it will always be unlocked.
It will only re-lock to the original carrier if it was in some way hacked or unofficially unlocked.
If it was purchased form AT&T in Puerto Rico, then it is locked to AT&T, and only AT&T can/could unlock it. So if you bought it from AT&T and you did not request an unlock from AT&T, then no, it is not officially unlocked.
Simply question - where, exactly did you buy it? Was it from AT&T in Puerto Rico? Was it from the Apple Store?