Here is a nice oneliner for you:
sed "$(grep -n "AllowOverride None" input.file |cut -f1 -d:)s/.*/AllowOverride All/" input.file > output.file
For the breakdown:
grep -n "AllowOverride None" input.file
returns the lines that match the pattern, preceeded by the line numbercut -f1 -d:
cuts the string and returns the first number it encounterssed "$LINE_NUMBERs/.*/AllowOverride All/" input.file
puts "AllowOverride All" at the line n°$LINE_NUMBER
You then just have to redirect the output to the file you want.
Et voila !