Default AT&T sim locked Moto X

Need help!!

My friend gave me an AT&T SIM locked Moto X. I tried to buy an unlock code at internet and did not work. Tried another online service and they provide me the same unlock code.

I think it is hardlocked and I am not going to be able to unlock it!

Do you guys have any possible idea to unlock it? Or do I have a useless phone forerver?

Nexus 5 (powered by PURITY ROM)

Nexus One --> Motorola ATT Atrix --> SGS2 --> Galaxy Nexus --> Nexus 4 --> Nexus 5