function _updateObjectExpirationDate(objectMD, log) {
    // Check if restoreCompletedAt field exists
    // Normally, we should check `archive.restoreWillExpireAt > current time`; however this is
    // checked earlier in the process, so checking again here would create weird states
    const isObjectAlreadyRestored = !!objectMD.archive.restoreCompletedAt;
    log.debug('The restore status of the object.', {
        isObjectAlreadyRestored,
        method: 'isObjectAlreadyRestored'
    });
    if (isObjectAlreadyRestored) {
        const expiryDate = new Date(objectMD.archive.restoreRequestedAt);
        expiryDate.setTime(expiryDate.getTime() + (objectMD.archive.restoreRequestedDays * scaledMsPerDay));

        /* eslint-disable no-param-reassign */
        objectMD.archive.restoreWillExpireAt = expiryDate;
        objectMD['x-amz-restore'] = {
            'ongoing-request': false,
            'expiry-date': expiryDate,
            'content-md5': objectMD['x-amz-restore']?.['content-md5'],
        };
        /* eslint-enable no-param-reassign */
    }
    return isObjectAlreadyRestored;
}
Check if the object is already restored, and update the expiration date accordingly:
> After restoring an archived object, you can update the restoration period by reissuing the
> request with a new period. Amazon S3 updates the restoration period relative to the current
> time.

@param {ObjectMD} objectMD - object metadata
@param {object} log - werelogs logger
@return {boolean} - true if the object is already restored