(a) Any county in this state may lease any lands owned by the county to any municipality in the county to be used for such purposes, subject to such restrictions, and for such consideration or compensation as shall be agreed upon by the contracting county and municipality.
(b) In addition to other terms the county court finds reasonable and proper, the contract for the lease of county property shall provide that when the leased property ceases to be used for the purpose expressed in the lease or needs to be used by the county, the lease may be cancelled by the county court after reasonable notice.