UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jqcQuLxg3eD/2J96G1CZAzbD+Yde8uQ37B+zgTcn5/E='
WHERE
key_id = '47d96b375df42a5dacbf5c11c7382de2030be0807cc172ebb85365d89190625e'
AND (
token = 'jqcQuLxg3eD/2J96G1CZAzbD+Yde8uQ37B+zgTcn5/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)