Neutrinoless double-β-decay matrix elements within the second quasirandom phase approximation method