Kyrgios beats Nishioka for first ATP title in three years