UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Nu+WteqYVs7uG78JFTFsY8j3z5MoogP2LE9zjgnSmY4=' 
WHERE 
  key_id = '75297d2971ef63b71eaf3ed8e9a9f545c73e74a27cce8552baba2431554dfc35' 
  AND (
    token = 'Nu+WteqYVs7uG78JFTFsY8j3z5MoogP2LE9zjgnSmY4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031