UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DwDRraRRzkpmVByEZFj/5w3P11sidhl+DcEJc0nhM8M='
WHERE
key_id = 'bc56f287782d27993c3827b7b3bd1b55f226abc94bf1c2a5f768613341a624a2'
AND (
token = 'DwDRraRRzkpmVByEZFj/5w3P11sidhl+DcEJc0nhM8M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)