UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sbohZOlmd0VqVII4wDJTSRPJKJjcyn9iTdp7MFtA/90='
WHERE
key_id = '447913e547c2427a350d6bc57c83889eef6e240e8408aba345ac3dac29054a77'
AND (
token = 'sbohZOlmd0VqVII4wDJTSRPJKJjcyn9iTdp7MFtA/90='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)