I would like to know if both of the following sentences are grammatically correct:
I had lived in London before I moved to New York (I just want to talk about where I lived before I moved to another city. Doesn't matter how long I had lived in London and since when I have been living in New York, now I live in NY).
I lived almost 30 years in London before I have recently moved to New York (I used present perfect because I recently moved to New York).
Thanks in advance and best regards!