After Effects - EG Template: Of 2 keyframes I only want to change the 2nd in EG, help!
To use the keyframed value of a property in an expression, there is a value attribute. And properties also have the key() method to access their keys, as well as the numKeys attribute to find out how many keys the property has. Lastly, there's the global time attribute. 

So now we've assembled the list of ingredients, here's how you could put it all together. This expression will use the keyframed value up to the last keyframe, and then hand over the reins to the result of an expression, in this case the value of the slider:

// link to your slider, or any calculated value:
var sliderVal = effect("Slider Control")("Slider"); 
var lastKey = key(numKeys);
if (time &lt;= lastKey.time){ // before the last keyframe
  // use the keyframe value before the last keyframe
  value;
} else {  // after the last keyframe
  // control using the sliders, or any expression
  sliderVal;
}


Of course this will jump from the keyframed value to the expression value instantly at the last keyframe. You can interpolate between the values by using one of the interpolation functions. So to interpolate between the keyframed value and the expression value between the second last keyframe and the last keyframe, you might use:

var sliderVal = effect("Slider Control")("Slider"); 
var k2 = key(numKeys); //last key
var k1 = key(numKeys - 1); //second last key    
// linear can take 5 arguments: 
// time, start time, end time, start val, end val
// and interpolates between start val and end val
linear(time, k1.time, k2.time, value, sliderVal)


You could also take advantage of the ease(), easeIn() or easeOut() interpolation functions, which you can just substitue for linear().