Here is a counterexample. Unfortunately it is not separated, so I don't know how interesting it is to you. Consider $X = \mathbf{A}^2 \cup \mathbf{A}^2$, glued along $\mathbf{A}^2 \setminus \{(0,0)\}$, and let $Y$ be one copy of $\mathbf{A}^2$. $X$ is not quasi-affine since it is not separated. $\operatorname{Cl}(X) \cong \operatorname{Cl}(Y) = 0$ since the complement of $Y$ in $X$ is a point, which has codimension 2. Also, $Y$ is affine, and $\Gamma(Y,\mathcal{O}_Y) = k[x,y]$ is of finite type. Finally, some remarks which I commented earlier: 1. [Schröer](http://doi.org/10.1007/s002290050203) has an example of a complete *normal* variety with $\operatorname{Pic}X = 0$, but I didn't compute its class group since you wanted a smooth example. 2. [Hamm and Lê](http://www.emis.de/journals/SC/2005/10/pdf/smf_sem-cong_10_71-86.pdf) show that a complex algebraic variety with $H^1 = H^2 = 0$ (the actual condition is weaker) would have trivial class group, so this might be a place where you could find a counterexample that is also a variety.