UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DReN+C+I5hf25ucx3utMCHphK8zGTR67qYd9Ofn23oY='
WHERE
key_id = 'cfcce1166296476f6d1cc0b8bfde49d27665b042360dbc7d4f644bf051dc0779'
AND (
token = 'DReN+C+I5hf25ucx3utMCHphK8zGTR67qYd9Ofn23oY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)