UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SYf78AIh2o9pNi9zevS8tSmFhSo9XJkCLOPS32nc9tE='
WHERE
key_id = 'b00ccf148b4f36ef0bfc964239cc560910425c4c4fb6786f36c7d505cf1e9a92'
AND (
token = 'SYf78AIh2o9pNi9zevS8tSmFhSo9XJkCLOPS32nc9tE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)