UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GeP9i/wsjC5yB5YNsM8TAQVjb7yC7fcIf7C7ckBY5kU='
WHERE
key_id = '66cb59230189848705e879f30becf7698ef3dddf87f32f86d1facefce23d360e'
AND (
token = 'GeP9i/wsjC5yB5YNsM8TAQVjb7yC7fcIf7C7ckBY5kU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)