How do I lock my MBP screen without locking my keychain? On MacOS High Sierra (10.13.3), how do I lock my screen without locking my keychain?

I run some long-running terminal scripts that make periodic use of the keychain, and would like the ability to lock my screen and walk away for lunch, without causing the terminal scripts to block for a password prompt.
If you have a screensaver you can lock that with your password so whenever screensaver tries to quit it needs a password. To set this up, first set up your screensaver if you don't have one. Then open System Preferences/Security and Privacy. Click the first tab in that window named General.  The 2nd line on this box allows you to set a password associated with the screensaver.