Can ESTA be extended?

It is not possible to extend ESTA. However, ESTA may be renewed. Authorisations obtained under ESTA are valid for the shorter period of 2 years or until your passport expires. After such period, any granted travel authorisation under ESTA must be renewed through a brand new application.
However, ESTA can be renewed in as short a time as a couple of minutes, so this shouldn’t delay any of your travel plans, although the U.S. Customs and Border Protection always recommend to apply or reapply for your ESTA when booking your travel tickets, or at least 72 hours before your travel date.
You may also re-apply for your ESTA before your current one expires. You may do so at any time before, on, or after the expiration date of your existing ESTA. If you receive the message “A valid, approved application with more than 30 days remaining has been found for this passport. Submitting this application will require payment for this application and will then cancel the existing application.”, you continue which will cancel the remaining days and replace it with your new application, which will then be renewed for another 2 years, or until your passport expires, whichever is soonest.
Re-applying for ESTA is a straightforward process. You will need follow the instructions to answer all of the required questions and submit a new application for travel authorisation, just like you did the first time you applied.