UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7cg6WK0RiSP3H+NGLDuR/mbXYcJMNL9eZ2+dWm3IxiY='
WHERE
key_id = '68afaee75a4288b22854ca57dd1a6de6d54d8f19d3269aab82b8acea8ff00de4'
AND (
token = '7cg6WK0RiSP3H+NGLDuR/mbXYcJMNL9eZ2+dWm3IxiY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)