UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jLWNYYKYAoXrO9rtd4ximO/TDx1v5ANT6fDz9sDub9k='
WHERE
key_id = '3060bb559a9facf564ae42d92a339757fc0d5a1cc67e1a93ba37a74c54c70715'
AND (
token = 'jLWNYYKYAoXrO9rtd4ximO/TDx1v5ANT6fDz9sDub9k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)