UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VeU6/37QGuXD2v9sHMi+DEkuNaVTnHzXOw3p1icebSU='
WHERE
key_id = '137aedf65f9eb2a1b63f479fb496557e02599dfc1f8b64f5dd267680068fc703'
AND (
token = 'VeU6/37QGuXD2v9sHMi+DEkuNaVTnHzXOw3p1icebSU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)