Both ahadith actually contain reliable and useful information.
As for the first it gives a guideline for a person who committed a sin that is subject of hadd: It says that we shouldn't reveal that we have committed a sin that is subject of had (punishment) as this is a kind of publicising and we are taught:
All the people of my Ummah would get pardon for their sins except those who publicise them. And (it means) that a servant should do a deed during the night and tell the people in the morning that he has done so and so, whereas Allah has concealed it. And he does a deed during the day and when it is night he tells the people, whereas Allah has concealed it. Zuhair has used the word hijar for publicising. (See for example in Sahih Muslim)
This doesn't mean we should lie if asked by a judge! Note that sincere repentance might lead to lifting a hadd!
While the second hadith shows an important rule for the people (judges) who may need to give a verdict of hadd: They shouldn't apply hadd if there's any doubt.
Both ahadith -regardless of their own authenticity- have many backups in the Qur'an and sunnah. But as you required a statement on the authenticity of these specific narrations you may find it in the following:
- The hadith from al-Mustadrak (Source in Arabic) can be found in al-Muwatta' (see here), az-Zorqani in his commentary of al-Muwatta' said that it has also been compiled by al-Bayhaqi in his as-Sunan al-Kubra -see here in Arabic- and considerd as sahih by ibn as-Sakkan ابن السكن and others among them as-Suyuti -see here in Arabic-. Al-Albani has also considered is a sahih -according to this fatwa on islamqa #240409- or hassan -according to this Arabic fatwa on islamweb #49568-.
- The hadith from Jami' at-Tirmidhi has also been compiled by other authors such as al-Hakim in his al-Mustadrak the major issue in this hadith is already quoted by at-Tirmidhi himself the narrator Yazid ibn Ziyad a-Dimashqi يزيد بن زياد is da'if imam al-Bukhari even said his hadith is rejected (munkar) and an-Nasa'i considerd him as rejected so this is the main reason while scholars such al-Bayhaqi, al-Bagahwi, ibn Hajar al-'Asqalani and others have considerd it as da'if. See also fatwa islamweb #366895 in Arabic.