I had to install additional screensaver program XScreenSaver and use it instead of default one because accepted answer had no effect for me on Ubuntu 16.04 and 17.10.
Install XScreenSaver:
sudo apt install xscreensaver
Add this command to Startup Applications:
xscreensaver -nosplash
Disable default Super+L shortcut
Install CompizConfig Settings Manager
sudo apt install compizconfig-settings-manager
Launch it and click "Ubuntu Unity Plugin"
Click the button next to "Key to lock the screen."
Disable
Add this command to enable Super+L shortcut for XScreenSaver in System Settings → Keyboard → Shortcuts → Custom Shortcuts:
Open your System Settings. We need to make changes to Power and Brightness & Lock settings.
Power Settings
Change the value of Suspend when inactive for to Don't suspend.
Brightness & Lock Settings
Change the value of Turn screen off when inactive for to Never.
This should help to achieve your desired result.
I had to install additional screensaver program XScreenSaver and use it instead of default one because accepted answer had no effect for me on Ubuntu 16.04 and 17.10.
Install XScreenSaver:
Add this command to Startup Applications:
Disable default Super+L shortcut
Install CompizConfig Settings Manager
Launch it and click "Ubuntu Unity Plugin"
Click the button next to "Key to lock the screen."
Disable
Add this command to enable Super+L shortcut for XScreenSaver in System Settings → Keyboard → Shortcuts → Custom Shortcuts: