Thousands of janitors who staged a 24-hour walkout Monday agreed to return to work after settling on a three-year deal with pay increases and improved benefits. The janitors, who work in the city's downtown offices, were due to return to work today. The janitors' contract expired at midnight Sunday. The contract was negotiated as thousands of members of Local 1 of the Service Employees International Union picketed office buildings. "It is a very good settlement," said Ken Munz, spokesman for the SEIU. "It's the best we have seen in a decade." Before the settlement, their salary of $10.10 an hour in 1992 had only increased to $11.40, $1.10 short of keeping up with the cost of living during that period, Munz said. The agreement calls for a pay increase of 45 cents in the first year, with increases of 35 cents and 30 cents in subsequent years. The walkout affected about 200 buildings and 5,500 workers, hundreds of whom attended an afternoon rally outside the downtown building where the contract talks were being held. Janitors in the suburbs have threatened to walk off their jobs if negotiations with a mediator fail to make any headway today. Their contract expired April 9.