What are the external airflow requirements for portable and window AC units?
You would be far better off building a roof type structure over the window well that is well above the window well and projects far enough out around the edges of the well that rain water does not enter the well. 

Trying to jury rig a scheme to keep an existing lid open "just enough" sounds like a recipe waiting for disaster. Either it will be left closed with the AC unit on and it will overheat and kill itself due to inadequate air flow. Or the lid will be left open an flood of water will enter the well and try flooding through the AC unit creating a potential safety hazard.