UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/sdrmKxuehi+tnLzG1GnSEaPI82dO+IfOl67jmAX2AE='
WHERE
key_id = '67a300e3cc3c583de3bf4095ef54e4f52c5855465c7ce8ed441701d23b4f231b'
AND (
token = '/sdrmKxuehi+tnLzG1GnSEaPI82dO+IfOl67jmAX2AE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)