UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FS/EuovhA37trbFY7Q5MZLFMSsHigTvyhlR3t9H6eNw='
WHERE
key_id = 'e33f52b572a5f23e9aeb85fd7f2f9fd7d49c2ad68484aeab017c0675b8669b0b'
AND (
token = 'FS/EuovhA37trbFY7Q5MZLFMSsHigTvyhlR3t9H6eNw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)