in which tables are stored inactive licenses ( for example expired)?
Can I delete one of them or restore it updating it from db?
don't have a SAM in front of me to check but never good to do thinks directly in the DB. bypassing application layer may result to corrupt data due to dependency as this layer that you may not be aware of.
Sometime there is no other choice but always risky
My 2 cents
As mentioned by Jerome, it is not advisable to do manual updated in the backend, especially license records.
Can you be more specific on what the current situation is and what is it that you are trying to achieve? Perhaps it can be done via the interface.
Please note that any backend updates are not supported; only actions within the GUI interface can be handled.
Retrieving data ...