screen saver and lock not in the same time
The setting you want is in preferences -> security and privacy -> general -> require password (some time) after screen sleep or screen saver.

Note that the lock is will happen (some time) after either the screen saver starts or the screen sleeping.