Oh, sorry, I misunderstood the question: Keep increasing, not just increase once.
In that case, this would be the code:
v = value;
fd = thisComp.frameDuration;
n=0;
inc=1;
while(inc == 1){
if([pick-whip a property value here].valueAtTime(time-fd*n)>=2){
n=n+1}else{
inc = 0}
}
value = value + 150*n
This version keeps increasing value 1 as long as value two>= 2 and resets value 1 to original (or keyframed) value when value 2 falls below 2.
If you need the value to keep increasing through the whole duration of the footage whenever above the threshold, you’ll need the while loop to check for values for ALL preceding frames in the comp, (until time-fd*n<= 0) and increment n for every frame the condition is met.