One way to lock a Windows computer from your keyboard is by pressing Ctrl + Alt + Del and then selecting the "Lock" option.
If you keep turning on Sticky Keys by mistake, you can turn Sticky Keys off and disable the Windows shortcut altogether.