Gnome Keyring GUI application is called Seahorse and shows as "Passwords and Keys" in the menu. Seahorse can manage multiple collections and you can lock them directly from the GUI (they appear under Passwords in the sidebar) simply by clicking on the padlock icon next to each of them. By default you will have only the Login collection.
If you don't see the sidebar, click on View then check By Keyring to display it.
If you wish to do this from shell, ex. automatically, this python oneliner will lock all collections, loosely based on what seahorse is doing when locking keys:
python -c 'import dbus; bus=dbus.SessionBus(); bus.call_blocking("org.freedesktop.secrets", "/org/freedesktop/secrets", "org.freedesktop.Secret.Service", "Lock", "ao", [bus.call_blocking("org.freedesktop.secrets", "/org/freedesktop/secrets", "org.freedesktop.DBus.Properties", "GetAll", "s", ["org.freedesktop.Secret.Service"]).get("Collections", [])])'
Expanded, it would look like this:
#!/usr/bin/env python
import dbus
bus = dbus.SessionBus()
# Get Collections array
collections = bus.call_blocking(
"org.freedesktop.secrets", "/org/freedesktop/secrets",
"org.freedesktop.DBus.Properties", "GetAll",
"s", ["org.freedesktop.Secret.Service"]
).get("Collections", [])
# Lock all Collections (return value is an array of locked collections)
bus.call_blocking(
"org.freedesktop.secrets", "/org/freedesktop/secrets",
"org.freedesktop.Secret.Service", "Lock",
"ao", [collections]
)