Kento Yamasaki won Japan's first world title in the men's keirin since 1987 as record-chasing Olympic gold medallist Harrie Lavreysen was eliminated in the semi-finals.