UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3demjpx7vUDfeOPu2JsM1G3YObV85RmGtj6gu6grq+Q='
WHERE
key_id = '43a6f40766d11898aecb009b2629a753078a53cfdb2ae04fe12f692bb9b385c5'
AND (
token = '3demjpx7vUDfeOPu2JsM1G3YObV85RmGtj6gu6grq+Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)