In his sentence "как раз" means "by the way"
Да я хотел как раз тебя предупредить" - By the way, I wanted to warn you