All credits go to https://github.com/ESX-PUBLIC/esx_doorlock
I modified this one to be able to lock doors and unlock it with a special key (you have to create an item) and specific job (or not).
You can choose to remove key from player inventory once door is open and decide if a job is needed or not.
Probably some clean possible.