You have 2 choices you can do a restore through iTunes that will wipe everything, keep your unlock but you will have to reactivate. Or you can restore to a virgin state that will re-flash your baseband. You will lose everything including your unlock just as if you had taken the iPhone out of the box.