This is the first thing that you should do. Perform a power reset and see if it works for you. Some laptops have a power reset button. If your laptop has such a button, use it to perform a power reset ...
Many users have faced this issue, where out of the blue, they see a message that says Locking, and then their laptop turns off automatically. When they again try to open the system, they fail to do so ...