She was told that she wouldn't get a 40-year sentence. A 20-year sentence is not a 40-year sentence - 20 is 1/2 of 40.
She may have grounds to appeal the sentence, and should discuss that with her lawyer. Generally, it's difficult to appeal from a guilty plea. Without knowing the circumstances, it's impossible to guess whether the sentence would be revisted by the Texas Criminal Court of Appeals, but that court is widely regarded as a rubber stamp for the prosecutor.

