It's both actually. Everytime you switch off the phone and/or you lose network for long time u will lose the unlock and you need to again repeat the unlock procedure.
Guys, just to let you know that I have mastered this art of unlocking the iPhone and I can do it within 1 minute. So basically now i don't bother much if my phone loses network and gets locked
I got the ones from AMZAOn, don't waist your money, it don't even fit, the tray gets stuck in iphone. I bought a bunch from the applenberry the SOURCE and did about 15 unlocks all work flawless !
Just buy an unlocked phone if you want it unlocked that much, so much easier than going through the trouble of paying for something that is not certain to work and is illegal.