where('cache_key', $cacheKey)->first(); if (! is_array($row)) { return null; } $expiresAt = strtotime((string) ($row['expires_at'] ?? '1970-01-01 00:00:00')); if ($expiresAt < time()) { return null; } return $row; } }