(1) Assume that $C$ is not open, but convex in $\mathbb{R}^2$.
Define $$ C :=C_1\cup C_2,\ C_1:=\{ (x,y)| y>0 \} ,\ C_2:=
\{ (x,0) |x<0 \} $$
Define $f|C_1=0$ and $f|C_2=1$.
Clearly $f((x,0))=0$ for all $x>0$ so that $f|\{ y=0\}$ is not convex.
(2) Assume that $C$ is open
Partial result : The case where $C$ is one-dimension is trivial.
Assume that $C$ is two-dimensional.
To show that extension of $f$ is convex, the following example is
considered. So it will be proved that the case arising in OP can not
happen.
Assume that $C=\{ (x,y)| y>0\}$ in $\mathbb{R}^2$, $$
(x_{n},\frac{1}{n})\rightarrow (0,0),\ a_n:=(x_{2n},\frac{1}{2n} ),\
\lim_n\ f(a_n)=a,$$ $$ b_n:= (x_{2n+1},\frac{1}{2n+1}),\ \lim_n\ f
(b_n)=b <a
$$ and $f(\pm
1,0)$ is finite.
Step 1 : WLOG $$ a_k\in {\rm conv}\ \{ (-1,\epsilon_1),\ (-1,\epsilon_2),\
b_l,\ b_m\}$$ for some $k,\ l,\ m$ where $\epsilon_i>0$ are small.
Consider $p\in [(-1,\epsilon_1)b_m]$ s.t. $a_k\in [pb_l]$
Here indexing is not important. And $[xy]$ is a line segment between
$x$ and $y$. Consider four points whose convex hull is 2-dimensional
4-gon and contains $a_k$. Consider a ray starting point at $b_l$
passing through $a_k$. Hence the ray meets a side of the 4-gon. So
$[(-1,\epsilon_1) b_m]$ is denoted as the side and $p$ is the
intersection point between ray and the side.
Step 2 : Let $$
s=d(a_k,b_l),\ t=d(a_k,p),\ u=d((-1,\epsilon_1),p),\ v= d(p,
b_m)$$
So $$ f(p) \geq \frac{(t+s)f(a_k)-tf(b_l) }{s} $$ and $$
\frac{vf(-1,\epsilon_1)+u f(b_m) }{u+v} \geq f(p)
$$
That is $$ f(-1,\epsilon_1) \geq \frac{1}{v} \{ (u+v)\frac{t}{s}
[f(a_k)-f(b_l)] + v f(a_k) +u [f(a_k)-f(b_m) ] \}
$$
If $k,\ l,\ m$ is large, it can be assumed that $s,\
d(b_l,b_m)<\delta$. If $ t=Cs$, then $$ \bigg(\frac{1}{v} (u+v)\frac{t}{s}
+\frac{u}{v} \bigg)[f(a_k)-f(b_l)] \approx \frac{u+v}{C\delta+2\delta} C (a-b) +\frac{u}{C\delta+2\delta} (a-b)
$$
So $f(-1,0)=\infty $ and it is a contradiction.
[Add] I just suggests the some case However it rule out other cases
If $f(0,0)=\infty$, there are sequences :
1) $a_n\rightarrow (0,0)$ s.t.
$f(a_n)\rightarrow \infty$
2) $a_n,\ b_n\rightarrow (0,0)$ and $f(a_n),\ f(b_n)
\rightarrow a,\ b,\ a>b $
3) $a_n \rightarrow (0,0)$ and $f(a_n)\rightarrow -\infty$
In the first case, if $a_n=(x_n,y_n)$, then $\max\ \{ f(-1,y_n),
f(1,y_n) \} =\infty$
In the second case, if $b_n=(x_n,y_n)$, then we can assume that
$$y_n>y_{n+1}$$
Then it goes down strictly. And define $$ R_n^\pm :={\rm conv}\ \{
(x_n,y_n), ( x_{n+1},y_{n+1} ), (\pm 1,y_n),(\pm 1,y_{n+1}) \} $$
Each $R_{n}^\pm$ is a closed 2-dimensional 4-gon. In further
$$\bigcup_n\ R_n^+ \cup \bigcup_n\ R_n^-$$ contains ${\rm conv}\ \{
(-1,y_1),(1,y_1),(-1,\epsilon ),(1,\epsilon )\}$ for any $\epsilon
>0$
By reindexing, we can assume that $a_n$ is in $R_n^-$. If $a_n$ is
in the interior of $R_n^-$, then the above argument holds
If $a_n\in [b_n (-1,y_n)]$, then note that $$\frac{ f(-1,y_n) |a_n-b_n| + f(b_n) |(-1,y_n)-a_n| }{|-1-x_n|} \geq
f(a_n) $$
So if $ \lim_n\ f(-1,y_n) =C$ is finite, then $C\cdot \lim_n\
|a_n-b_n| + b \geq a $. Hence we have a contradiction.
If $a_n \in [b_nb_{n+1}]$, then note that $\max\ \{ f(b_n),f(b_{n+1}) \} <\frac{a+b}{2}< f(a_n)$ for
sufficiently large $n$. It contradicts to convexity of $f$.
In third case, assume that $a_n=(x_n,y_n),\ f(a_n) <-n$ Then
$f(-1,y_n)\rightarrow a$ Then $$ \frac{ f(-1- \epsilon,y_n)\cdot |-1-x_n| +
f(a_n)\cdot \epsilon }{|-1-x_n|+\epsilon } \geq f(-1,y_n) $$
If $ \epsilon = \frac{-1}{f(a_n)}$, then we have $a-1\geq a$ by
limiting. So it is a contradiction.