UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/YmHW+vQl6pDihymOl+9DQsi1NKnoaUTbNgM6tOh0Zk=' 
WHERE 
  key_id = '85f1b3eda5a1db0fe5d6f711bef83077474dc60ac339e3bc29367e365f26cc16' 
  AND (
    token = '/YmHW+vQl6pDihymOl+9DQsi1NKnoaUTbNgM6tOh0Zk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014