This answer can be view as a supplement to joshphysics' correct answer, possibly stressing slightly different things and using slightly different words.
Before defining functional/variational derivatives in Lagrangian formalism, it is crucial to understand exactly which variables are independent of each other and which are not? In other words, which variables can we freely vary and which can we not?
This is simplest to understand in point mechanics (PM), see e.g. this Phys.SE post. Here we shall focus on $n+1$ dimensional field theory (FT) with $n$ spatial dimensions and one temporal dimension.
Let us for simplicity assume that there is only one field $q$ (which we for semantical reasons will call a position field). The field $q$ is then a function $q:\mathbb{R}^{n}\times[t_i,t_f]\to \mathbb{R}$. There is also a velocity field $v:\mathbb{R}^{n}\times[t_i,t_f]\to \mathbb{R}$.
I) Let there be given an arbitrary but fixed instant of time $t_0\in [t_i,t_f]$. The (instantaneous) Lagrangian is a local functional
$$\begin{align}L&[q(\cdot,t_0),v(\cdot,t_0);t_0]\cr
~=~&\int \!d^nx~{\cal L}\left(q(x,t_0),\partial q(x,t_0),\partial^2q(x,t_0), \ldots,\partial^Nq(x,t_0);\right. \cr
&\left. v(x,t_0),\partial v(x,t_0),\partial^2 v(x,t_0), \ldots,\partial^{N-1} v(x,t); x,t_0\right),\end{align}\tag{1} $$
where $\partial$ denotes spatial (as opposed to temporal) derivative. Here $N$ is finite for a local FT, and $N\leq 1$ for a relativistic FT. The Lagrangian density ${\cal L}$ is a function of the variables listed in eq (1).
The (instantaneous) Lagrangian (1) is a functional of both the instantaneous position $q(\cdot,t_0)$ and the instantaneous velocity $v(\cdot,t_0)$ at the instant $t_0$. Here $q(\cdot,t_0)$ and $v(\cdot,t_0)$ are independent variables. More precisely, they are independent (spatially distributed) profiles, or in other words, independent functions $\mathbb{R}^n\to \mathbb{R}$ over the $x$-space. The (instantaneous) Lagrangian (1) can in principle also depend explicitly on $t_0$. Note that the (instantaneous) Lagrangian (1) does not depend on the past $t<t_0$ nor the future $t>t_0$.
Thus it makes sense to define equal-time functional differentiations as
$$\frac{\delta q(x,t_0)}{\delta q(x^{\prime},t_0)}
~=~\delta^n(x-x^{\prime}), \qquad
\frac{\delta v(x,t_0)}{\delta q(x^{\prime},t_0)}~=~0,$$
$$ \frac{\delta v(x,t_0)}{\delta v(x^{\prime},t_0)}
~=~\delta^n(x-x^{\prime}),\qquad
\frac{\delta q(x,t_0)}{\delta v(x^{\prime},t_0)}~=~0. \tag{2} $$
And it makes sense to define canonical momentum as
$$p(x,t_0)
~:=~\frac{\delta L[q(\cdot,t_0),v(\cdot,t_0);t_0]}{\delta v(x,t_0)},
\tag{3} $$
where it is implicitly understood that the position $q$ is kept fixed in the velocity differentiation (3). In the $N\leq 2$ case, the field-theoretic momentum definition (3) becomes
$$\begin{align}&p(x,t_0)~=~\cr
&\left(\frac{\partial }{\partial v(x,t_0)}- \sum_{i=1}^n\frac{d}{dx^i}\frac{\partial }{\partial (\partial_iv(x,t_0))}\right)\cr
&{\cal L}\left(q(x,t_0),\partial q(x,t_0),\partial^2q(x,t_0); v(x,t_0),\partial v(x,t_0);x,t_0\right) .\end{align} \tag{4} $$
In the $N\leq 1$ case, the field-theoretic momentum definition (3) becomes simply a partial derivative
$$p(x,t_0)
~=~\frac{\partial{\cal L}\left(q(x,t_0),\partial q(x,t_0); v(x,t_0);x,t_0\right) }{\partial v(x,t_0)}
.\tag{5} $$
II) Finally let us integrate over time $t\in[t_i,t_f]$. The action functional reads:
$$ S[q]~:=~\int_{t_i}^{t_f} \! dt~ \left. L[q(\cdot,t),v(\cdot,t);t]\right|_{v=\dot{q}}.\tag{6}$$
Here the time derivative $v=\dot{q}$ does depend on the function $q:\mathbb{R}^{n}\times[t_i,t_f]\to \mathbb{R}$.
$$\frac{\delta q(x,t)}{\delta q(x^{\prime},t^{\prime})}
~=~\delta^n(x-x^{\prime})\delta(t-t^{\prime}), \tag{7} $$
$$\frac{\delta \dot{q}(x,t)}{\delta q(x^{\prime},t^{\prime})}
~=~\delta^n(x-x^{\prime})\frac{d}{dt}\delta(t-t^{\prime})
~\equiv~\delta^n(x-x^{\prime})\delta^{\prime}(t-t^{\prime}). \tag{8} $$
In particular, it does not make sense to vary independently wrt. to the velocity in the action (6) while keeping the position fixed.
See also this related Phys.SE post.