Since you already have the timerange defined, you can just use the select key command on that timerange with a buffer off 0.0001 on each side to select all the keyframes created by the command:
import maya.cmds as mc
def insertKeyPercentage(percentage = 50):
mc.selectKey(clear = True)
key1 = mc.currentTime(q = True)
key2 = mc.findKeyframe(t = (key1,key1), w = "next")
p = ((key2-key1)/100)*percentage
newKey = mc.setKeyframe(i = True, t = (key1 +p))
mc.selectKey(time = (key1+0.0001, key2-0.0001), k = True)
insertKeyPercentage(percentage = 50)
Now this will cause problems if the timespan between key1 and key2 is less than 0.0002 frames, but if that is the case, your scene has bigger problems anyways.
But I should also mention, that I added in a clearing of the key selection, since otherwise the program could not be run twice in a row without manually deselecting the keys