It is natural to think that the given condition implies the inequality $\left| f(y) - f(x) \right| \leq C \left| y - x \right|^2. \tag{1}$ But this implication requires some justification. So here is a proof.
Let $\epsilon > 0$ be any positive real number. To prove $(1)$, we decompose the set $\{ 0 < \left| y - x \right| < \epsilon \}$ in a dyadic manner as follow:
$ \{ 0 < \left| y - x \right| < \epsilon \} = \bigcup_{n=1}^{\infty} \big\{ 2^{-n} \epsilon \leq \left|y - x\right| < 2^{-(n-1)}\epsilon \big\}. $
Then whenever $n \geq 1$ and $2^{-n} \epsilon \leq \left|y - x\right| < 2^{-(n-1)}\epsilon$, we have
$ \left|f(y) - f(x)\right| < 2^{-2(n-1)} \epsilon^2 \leq 4 \left| y - x \right|^2. $
Thus whenever $0 < \left| y - x \right| < \epsilon$, we have $2^{-n} \epsilon \leq \left|y - x\right| < 2^{-(n-1)}\epsilon$ for some $n \geq 1$ and hence
$ \left|f(y) - f(x)\right| \leq 4 \left| y - x \right|^2. $
Then it follows that
$ \left|\frac{f(y) - f(x)}{y - x}\right| \leq 4 \left| y - x \right|, $
proving $(1)$ with $C = 4$.
Now the rest follows in various ways as many people pointed out. For example, taking the limit as $y \to x$, we find that $f$ is differentiable at any point $x$ with vanishing derivative. Therefore $f$ is constant.