Hoping my English is clear,if anywhere improper,please point it out.
Before answering your question,if you are a beginner,I strongly recommend you don't read Landau's textbook,this is completely not for a beginner.When I read Landau,I found some sentenses are very hard to understand,like
A second conservation law follows from the homogeneity of space. By virtue
of this homogeneity, the mechanical properties of a closed system are unchanged by any parallel displacement of the entire system in space. Let us
therefore consider an infinitesimal displacement $\epsilon$ , and obtain the condition for the Lagrangian to remain unchanged.
We didn't discussed terms are:homogeneity,mechanical properties,closed system,unchanged,parallel displacement,entire system,remain unchanged.When I was a beginner,I can only understand them intuitively,but I can't speak what they exactly are!These terms are so abstract and concise,and we also don't have some examples in Landau's book to understand them,which is quite unfriendly for beginners(at least all people I meet in real,but not online..)
I guess the previous answer by Andrew is incorrect,seems Andrew treated the $f$ as force so he claim $f=0$ in the text.But this is not true.
Let's consider $L=\frac{1}{2}mv^2-\frac{1}{2}kx^2$,let $x_n =x+v_0t$ and $v_n=v+v_0$,which is an inertial coordiante transformation.sub n for new.
Then as an exercise you will find $L_n=\frac{1}{2}mv_n^2-\frac{1}{2}kx_n^2$ differ a total derivative term and will give you the same equation of motion,which is intuitively obivious $ma=-kx$ because we just did an inertial transformation,which doesn't creat a new force.
So your question now can be answer like this:
First,your understanding seems need to be changed a bit.
How does one deduce in this case that momentum is conserved?
The philosophy is:If we assume the so called homogenity of spacetime,then some certain lagrangian in this space there will offer some conserved quantity.The conservation of momentum is asserted both by the homogenity(property of the backgroud) and the expression of Lagrangian(property of the system).
So Landau indeed mixed the two things.Let's consider a uniform force F acting on a particle $L=\frac{1}{2}mv^2+Fx$,which is clearly a legal Lagrangian but it is impossible to derive the conservation law of momentum!
The lack of homogenity of background space is more subtle and I think explain it seriously is not so easy,but intuitive I guess its understandable.
So second,what if $L$ and $L_n$ differred by the total derivative term?
The answer is we have the same conserved quantity but in different value.
For another question,if we consider the motion in polar coordinate(like the motion of planet).What transformation should we do to keep the conservation of angular momentum?
The answer is an uniformly rotating transformation $\phi '=\phi +\omega _0 t$,and after the transformation $r'=r+v_0t$,the two Lagrangian will not differred by a total derivative!