Green’s Dictionary of Slang

quay n.

also quee
[? quod n. (1)]

[mid-18C–mid-19C] (US Und.) prison.