No, it won't.
Here is the process and hopefully that explains to you why…
Carrier sends unlock request to Apple and Apple inserts your IMEI in to their database. Apple's iTunes activation server issues a new activation policy ticket for your IMEI that unlocks your phone.
The next time your phone checks in with Apple the policy is applied and your phone is unlocked. Once your IMEI is inserted in the database it can't be revoked - it's permanent.
So, when you restore, your phone will once again check with the activation server and find it's unlocked still. Life proceeds as normal.
Now if you ever replace a phone your old IMEI gets replaced with the new IMEI and that phone becomes unlocked (assuming the old one is unlocked as well) under the new IMEI. Then it's the same as I just described.
So, no worries. Once unlocked an iPhone is always unlocked.