If u,v are both row vectors (i.e. K evaluates to a scalar), K will only be positive definite if K=dot(u,v)>0.
If u and v are more general matrices (not row vectors) and u~=v, then K=u*v' will not generally be symmetric, let alone positive definite. Even when u=v, K will be non-negative definite, but will not be strictly positive definite unless u has full row rank. However, the additional matrix 1./diag(boxconstraint) is strictly positive definite assuming all boxconstraint(i)>0. Adding a non-negative definite matrix to a strictly positive definite matrix produces a strictly positive definite result always.