§ 122. When petition may be presented. A person so imprisoned may apply for such a discharge, at any time; unless the sum, or, where he is imprisoned by virtue of two or more executions, the aggregate of the sums, for which he is imprisoned, exceeds five hundred dollars; in which case, he cannot present such a petition, until he has been imprisoned, by virtue of the execution or executions, for at least three months.