UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'q/oCh7ZzZ5Zx2bdhXyOhsXLKYJO/Mb8Wfe0nswyCJxc='
WHERE
key_id = '590744030d460f02e347b82494402a696a9cdf15bc1ec2f3aee954730b606f48'
AND (
token = 'q/oCh7ZzZ5Zx2bdhXyOhsXLKYJO/Mb8Wfe0nswyCJxc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)