If I leave my phone for 30 seconds the back light will go off and screen gets locked automatically. But now the automatic screen lock is not working, only the back light gets off.
It's possible that the lock settings have been changed. To adjust the settings, go to Menu > Settings > Security > Screen lock. You can customize the settings for automatic lock from that location.