Consideration is given to binary self-dual codes with an automorphism of odd prime order. New constraints are obtained for possible cyclical structures of the automorphism. The structure of the codes is investigated. All extremal even self-dual codes of length 40, for which the order of the group of automorphisms can be divided by a prime p greater than 5, are obtained.