Let \(\xi \in \mathbb {R}\) , and \(\rho _i\in \mathbb {R}\) with \(0<|\rho _i|<1\) for \(1\le i\le 3\) . For an expanding real matrix \(\begin{aligned} M=\begin{bmatrix} \rho _1^{-1}&{}0&{}\xi \\ 0&{}\rho _2^{-1}&{}-\xi \\ 0&{}0&{}\rho _3^{-1} \end{bmatrix}\in M_3(\mathbb {R}) \end{aligned}\) and an integer digit set \(D=\{(0,0,0)^t, (1,0,0)^t, (0,1,0)^t, (0,0,1)^t \}\subset \mathbb {Z}^3\) , let \(\mu _{M,D}\) be the self-affine measure defined by \(\mu _{M,D}(\cdot )=\frac{1}{|D|}\sum _{d\in D}\mu _{M,D}(M(\cdot )-d)\) . In this paper, we prove that if \(\rho _1=\rho _2\) , then \(L^2(\mu _{M,D})\) admits an infinite orthogonal set of exponential functions if and only if \(|\rho _i|=(p_i/q_i)^{\frac{1}{r_i}}\) for some \(p_i,q_i,r_i\in \mathbb {N}^+\) with \(\gcd (p_i,q_i)=1\) and \(2|q_i\) , \(i=1,2\) . In particular, if \(\rho _1,\rho _2,\rho _3\in \{\frac{p}{q}:p,q\in 2\mathbb {Z}+1\}\) and \(\rho _1=\rho _2\) , then there exist at most 4 mutually orthogonal exponential functions in \(L^2(\mu _{M,D})\) , and the number 4 is the best.