By all means, lock your machine when you walk away from it. Just don't pretend that would provide any protection against strangers walking through your office for even a few seconds.
Here's a USB dongle that's actually a key-logger with 2GB of storage and WiFi offloading for about $150 bucks available on Amazon:
https://www.amazon.com/Wi-Fi-Premium-Hardware-Keylogger-comp...
Options as cheap as $50 are available if you're willing to accept less storage and risk a second physical contact to recover your device (no WiFi).