Windows Plesk error: DB query failed: Duplicate entry ‘logout’ for key 1

If you try to disable a client in Plesk and you get failure with the error:

DB query failed: Duplicate entry ‘logout’ for key 1

delete all records with login='{the username of the client}’ from sessions table of Plesk database.

For example if you use mysql Plesk database please do the following:

Go to command line and login to mysql: cd %plesk_dir%\mysql\bin\
mysql -uadmin -p************** -P8306 psa

2) Clear entries in sessions table:
delete from sessions where login='{the username of the client}’;

After that you can disable the client.