How do I use SetPin / ClearPin in a scene for my door lock??

So basically what I need is simple. I want to be able to enable and disable a code from my door lock. I don’t care if it’s changing the code. Deleting and re-adding the code. Or modifying the code’s restrictions. As long as I can get a code to be enabled in my door lock and be disabled later by a scene. My door lock is the kwiqset 914 so it should have this functionality, I just don’t know how to do it. I looked up the variables and actions, but I haven’t figured out how to correctly use that information to make lua code, or even how to make modifications in the advanced editor. If someone could shed some light on this, I would really appreciate it!