Will my iphone lock if i update my IOS version?

I recently bought an iphone4s from ebay. The seller explained that the phone was originally on At&t carrier ( I'm with T mobile) . He had it unlocked. He also jailbroke it too. What i want to know is, if i update the IOS will my phone lock again, or will it be okay?

If it was factory unlocked, you will not lose the unlock.
If it was unlocked in a different way, you will lose the unlock.