I've got a simple USB watching script (with hammerspoon) to lock my computer when I remove my yubikey. I just yank the yubikey and go.
I also have it iMessage me when it's removed. In case someone else grabs it when I'm not near it.
I also have it wake up the screen when I plug it in, combined with Knock I can get in and out of my computer quickly and easily.