I'm assuming you have a recent linux system with
systemd (e.g. Ubuntu 16.04 or newer).
If you need to unlock your own session, just run
loginctl unlock-session (no root required because it's your own session). If you have multiple sessions and want to select just one, run
loginctl list-sessions to identify session and then run e.g.
loginctl unlock-session c187.
If you need to unlock all sessions, just run
sudo loginctl unlock-sessions. Note that this will immediately unlock ALL sessions no matter which user is running the screen saver.
If you need more information to identify the correct session, you can try something like this:
loginctl list-sessions --no-legend | while read id rest; do echo; loginctl show-session $id; done