Warning: for this app to work it is required that you install the Windows PC version on your computer, from https://www.gadgetish.com.
When your phone is close to the PC, it automatically unlocks it by measuring the Bluetooth signal strength. When you go away, it automatically locks it.
You can also use your phone's fingerprint reader to lock/unlock your PC.