UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aeC4jVZpoanDoJCX0pe4J/ktWHeKxs1z+6AOaaFRyx4='
WHERE
key_id = '672524e4eed38a49ae16e9721e32347ab85f578bed22dc62bf509d9f7244f820'
AND (
token = 'aeC4jVZpoanDoJCX0pe4J/ktWHeKxs1z+6AOaaFRyx4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)