Dynamic lock is one of the salient features of Windows 10 Preview build 15031.
It automatically locks your Windows 10 PC when you’re not around based the proximity of a Bluetooth-paired phone. If the phone is not found near your PC, Windows turns off the screen and locks the PC after 30 seconds.
How to get it?
Click Sign-in options
Scroll down to get Dynamic lock
Put a tick against Allow Windows to detect when you’re away and automatically lock the device.