An efficient codebook-based beam training technique is proposed for mmWave communication systems operating under non-line-of-sight (NLoS) channel conditions. Using convex optimization theory, this technique formulates the beam training process as a combinational optimization problem. It finds the best transmit-receive beam pair that maximizes the received signal power by iterating the Nelder-Mead simplex method through a multi-stage formulation of the training process. Compared with beamforming protocols adopted by 60 GHz WLAN/PAN systems, the proposed technique is robuster in NLoS scenarios. Simulation results demonstrate that the proposed technique achieves the same selection performance as the exhaustive search with a possibility of 87.6% while requiring moderate measurement steps.