UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MJsfNLTi09EMcgh4GPwozHzPMO3/AV3ssgMavF60L/g='
WHERE
key_id = '8d67561e8e00605537f446aac42ee174a2767144b3cf0cae5e9333cb8dc5ddaf'
AND (
token = 'MJsfNLTi09EMcgh4GPwozHzPMO3/AV3ssgMavF60L/g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)