Phase II trial to study the effectiveness of flavopiridol in treating patients with recurrent intermediate-grade or high-grade non-Hodgkin's lymphoma or mantle cell lymphoma. Drugs used in chemotherapy use different ways to stop cancer cells from dividing so they stop growing or die.