<?php
// cleanup_tokens.php

require 'db.php';

try {
    $stmt = $pdo->prepare("DELETE FROM tokens WHERE expires_at < NOW()");
    $stmt->execute();
    echo "Expired tokens have been cleaned up.";
} catch (Exception $e) {
    echo "Error cleaning up tokens.";
}
?>
