UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SwcviFQwgvdN/TF3CHyjVL8z78M8bJpK3OlHGLpgjT4='
WHERE
key_id = '5860a9e035ddf8d6ed158a5f5f9b64bd3e76219471b84a6421485141cd7cb33c'
AND (
token = 'SwcviFQwgvdN/TF3CHyjVL8z78M8bJpK3OlHGLpgjT4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)