UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QYIQ/QpZ6tKXW0t6K9z1VJfbwTmv1R9VvJ/vfVhd2ks='
WHERE
key_id = '1b37f465b3a359f59bb7af0bd0d979eee57d0b8f028b3085cebeb4fc55173d6c'
AND (
token = 'QYIQ/QpZ6tKXW0t6K9z1VJfbwTmv1R9VvJ/vfVhd2ks='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)