UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hSz4FB5cfjJwdRwQDptTdtj/SPGioRyiI0psA4P5bDg='
WHERE
key_id = '63856bc1a4a623c0eb78e401dcf150af8d105d9b2cfbe6a4ab50fd34324e9968'
AND (
token = 'hSz4FB5cfjJwdRwQDptTdtj/SPGioRyiI0psA4P5bDg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)