UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2KGo1rYz1Lb/CWGIjmpNnzmYbq/wVAxpFi7ByIeYZTg='
WHERE
key_id = '81b19d4869822c8f1d69b10ac543bf2769e59e03600aeca9cf8ae79f035ccb3b'
AND (
token = '2KGo1rYz1Lb/CWGIjmpNnzmYbq/wVAxpFi7ByIeYZTg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)