UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LWpVwKM7D+N/U1H6KcJv1Nxm+YbtDdBnRvZsr3/d298='
WHERE
key_id = '7e7dc683f21b3484918e4c630a9ffd5aac6dbac576b377897dfc8c50bd58cdb9'
AND (
token = 'LWpVwKM7D+N/U1H6KcJv1Nxm+YbtDdBnRvZsr3/d298='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)