UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DIqVo7DT/jpjL4ajFIFmZJhGmaEV7dkPRdyJmacj7gY='
WHERE
key_id = '35101768b236377fd588581c5db598aaf134cea2c9a463b530ee89fb1424aa85'
AND (
token = 'DIqVo7DT/jpjL4ajFIFmZJhGmaEV7dkPRdyJmacj7gY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)