UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uCvGbFdcjWF4qLik5ia5hf+GaV8Mv/VrAxR/RkSMuS8='
WHERE
key_id = 'f22e9eb5972f78435acfb9bc976613461c6145766578e32df71841c4902a600e'
AND (
token = 'uCvGbFdcjWF4qLik5ia5hf+GaV8Mv/VrAxR/RkSMuS8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)