UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'scr/dONQCiccNR5BhaZePaRKBu9BFTqd/vrarXGdtTg='
WHERE
key_id = 'b061fe30273d2621a0ae79240c66ddb7d76c428e97b8be196d2adc077fc0fe7b'
AND (
token = 'scr/dONQCiccNR5BhaZePaRKBu9BFTqd/vrarXGdtTg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)