UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '86NQUfMw4cMOj9h/b1ISuXHxbyQHO4jEngycC7LR5Wc='
WHERE
key_id = '2378006680f0188f4afc39d1dcafabc10d12a840371d49c62adcdb3c886c71a4'
AND (
token = '86NQUfMw4cMOj9h/b1ISuXHxbyQHO4jEngycC7LR5Wc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)