A uniform asymptotic expansion for weighted sums of exponentials