Mufti says: First thing, lying is a grave sin and if you lie about such matters then it is a fraud and that is a continuous sin. It is a fraud and a person is involved in continuous lying.
As far as whether the salary earned from such a job will be halal is concerned, that depends on if an experience of 5 years was asked for but you have been able to gain the knowledge needed to perform the job in two years then time duration won’t matter. It will be about the potential of the concerned person.
Secondly, if you are not as educated as it was required for the job but are capable of performing what is expected from you, then the salary earned from that job can be halal.