UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LikwT4+V7MEBPRUxNPcyH+fKZTqhcr5DKS9lGh6yuIU='
WHERE
key_id = '68f90be66e7014c5820cf980698efef9fd9ad41c21432139ecb73a9eab80287e'
AND (
token = 'LikwT4+V7MEBPRUxNPcyH+fKZTqhcr5DKS9lGh6yuIU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)