In this paper, we present a side-channel resilient moving target defense mechanism against power-/electromagnetic-based side-channel attacks. Recent countermeasures use fresh rekeying after every encryption/decryption process; this causes major overhead in synchronizing the communicating parties. In contrast to previous work, our mechanism integrates fresh rekeying and masking techniques at an interval, where these techniques are driven by the maximum number of side-channel leakage traces required toward a successful embedded attack. Hence, the mechanism tracks the effect of attacks on the number of traces, and consequently applies rekeying at suitable intervals to reduce the computational/communication overhead, while increasing the attack cost. The mechanism scalability was evaluated against an advanced attack model based on machine learning methods that reduces significantly the number of traces required for a successful attack under masking implementation.