No, a factory reset will not relock / re-enable the network lock on your phone. Once you officially unlocked your device, it should stay that way for good even when your receive software updates. However, if you reflash your phone with the official firmware from your provider, you may relock your phone. In that case, your old unlock code should work.