We study high-order harmonic generation (HHG) resulting from the illumination of plasmonic nanostructures with a short laser pulse of long wavelength. We demonstrate that both the confinement of the electron motion and the inhomogeneous character of the laser electric field play an important role in the HHG process and lead to a significant increase of the harmonic cutoff. In particular, in bow-tie nanostructures with small gaps, electron trajectories with large excursion amplitudes experience significant confinement and their contribution is essentially suppressed. In order to understand and characterize this feature, we combine the numerical solution of the time-dependent Schrödinger equation (TDSE) with the electric fields obtained from 3D finite element simulations. We employ time-frequency analysis to extract more detailed information from the TDSE results and classical tools to explain the extended harmonic spectra. The spatial inhomogeneity of the laser electric field modifies substantially the electron trajectories and contributes also to cutoff increase.