On the Einstein relation for a mechanical system