The curve has to do with how you're using lerp. Since you have the in and out locations you can change the lerp to basically lerp(in.x, out.x, amount) and just add to/subtract from the amount value to a from 0 and 1. The min/max is basically like clamp but in only one direction.
global number zoom=0
global number amount=0
on any key pressed
--- set zoom to 1-zoom
zoom=0
--- set amount to max(amount-0.5*dt, 0)
zoom=1
--- set amount to min(amount+0.5*dt, 1)
every tick
--- scroll to (lerp(in.X,out.x,amount), lerp(in.y,out.y,amount))
--- set layout scale to lerp(1, 0.3, amount)