You dont have timezone info in your dates so i assume dates from db are in the same timezone as server.
Use DateTime, its add() method to add the time from api to it as a DateInterval and then compare it with current time to get the result.
<?php
$timestamp = '2020-07-24 21:24:27';
$timeout = '00:03:47';
function isExpired(string $timestamp, string $timeout): bool {
$timestampDate = new DateTime($timestamp);
$timeoutParts = explode(':', $timeout);
$timestampDate->add(new DateInterval(sprintf('PT%sH%sM%sS', $timeoutParts[0], $timeoutParts[1], $timeoutParts[2])));
return $timestampDate < new DateTime();
}
// now for me is 2020-07-24 20:37:00
var_dump(isExpired($timestamp, $timeout)); // false
var_dump(isExpired('2020-07-24 20:00:00', '01:00:00')); // false
var_dump(isExpired('2020-07-24 19:00:00', '01:00:00')); // true
var_dump(isExpired('2020-07-23 19:00:00', '12:00:00')); // true
var_dump(isExpired('2020-07-25 19:00:00', '12:00:00')); // false