$expiration_duration = apply_filters( ‘password_reset_expiration’, DAY_IN_SECONDS );

in general we use WordPress filters to make changes for data. so in this code the filter password_reset_expiration allows us to make changes in it’s parameter DAY_IN_SECONDS which equals 86400 seconds.

so we can change this value by adding a function that returns a new value to this filter:

add_filter( 'password_reset_expiration', function( $expiration ) {
    return MONTH_IN_SECONDS;
});

this function changes the expiration time to be last for one month

we can also change to to any count of seconds

add_filter( 'password_reset_expiration', function( $expiration ) {
    return 60; // One minute
});

the upper codes are working in theme functions.php or your plugin files. just be sure to pass an integer for the seconds number