It would be interesting to be able to lock your guns with a trigger lock.
Crafting
To get a lock key you would need the lock in your inventory. In the crafting interface you would need to have 2 scrap, a blowtorch and the lock itself. Combine those and you will get a key that is bound to that lock. (Of course the lock and blowtorch would be unused or have lowered durability)
Application
You would be able to remove and apply a lock in the attachments interface in a slot for trigger locks. To apply the lock you would need the key in your inventory, the lock and you would need to lock the lock onto the trigger. To remove the lock you would need the key to remove the trigger lock from the gun.
You can also remove the lock if you do not have a key. But it can take time to remove the lock without the key. Firstly you can destroy the lock with a blunt object or a blowtorch. This would take around a minute to destroy.
Otherwise you can lockpick the lock with an implemented system or an item. The amount of time would varie depending on skill if there is a system involved. If not it would take a 10 second animation to unlock it with an item. This would yield a lock that is damaged 20% of its durability.
Use
The trigger lock would be able to prevent anyone from using your guns until the lock is unlocked or destroyed. This would stop people from taking a locked gun in your base (or anywhere else you would store a gun) and shooting you unless they want to take the time to break into it or find the key.
How To Obtain
You can find the lock in gunshops and rarely in civilian spawns. These ones would be able to be destroyed and picked. You can also find military grade trigger locks in military locations. These trigger locks would be unable to be destroyed without destroying the trigger assembly in the process. You can either unlock this with a key or lockpick it with 3x the time or skill needed.