Before then "prisons" were more or less temporary affairs, usually just a makeshift holding chamber where people were kept before the actual punishment was meted out (death, torture, or mutilation). But the idea of a building where people are isolated and placed under permanent bodily control for months or years on end by the State (for the betterment of society, or fixing of the individual, or punishment, or whatever) is very much a product of the Enlightenment.
Or are you wrapping ancient Egypt into your notion of radically modern.
(Ok, maybe ancient Egypt didn't have many cells with walls and bars for windows, but they sure had prisoners chained to things)