Try using this:
DELETE FROM tps_user_session WHERE tps_deleted = 1
This should only remove deleted user sessions, meaning that user has closed their browser or console. This will apply to most user sessions if you run this as a daily script on the database.
Also, as of 7.4 this particular task is handled by Background Services so the database direct method is no longer required.
Thanks for your response.
The script that you give is the same as provided in this community.
To resolve this issue, first I must erase all data in tps_lock_item table that linked with tps_user_session table and followed by running the script as your advice.