Any contract relating to salvage or any terms thereof may be annulled or modified by a competent court, where it appears to the court, that—
(a) the contract had been entered into under undue influence or the influence of danger and its terms are inequitable; or
(b) the payment under the contract is in an excessive degree too large or too small for the services actually rendered.