When Spotify stops playing on the locked screen then you first have to check the notification access on the lock screen from your settings. If everything looks fine in the settings then move to the Play Store and search for Spotify and check is there are any updates pending in your application. The best solution is to re-install the application after uninstalling it from the device.