iLok license codes provided on purchase can only be used once for initially redeeming the perpetual license to your iLok account.
If you are reinstalling your plugins on a new machine or after formatting, etc, you will not need to use the code again provided you have logged into the same iLok account where products were registered.
After installing your plugins, iLok will prompt you for the license codes when starting up your DAW. Simply click Skip and proceed to enter your login details and select your machine/cloud/iLok Key as location and you'll be up and running again.
For more on how to manage licenses and activations in iLok License ManagerPlease see here - https://help.ilok.com/faq_licenses.html