UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'B+U6PQlxgGbePVY4NVpraYv/X7k929z6eA4LBmywvBY='
WHERE
key_id = '075fbf9d93ac626d203c4272faa5ea595a7d9e5887c24689e3153c5486b3f63f'
AND (
token = 'B+U6PQlxgGbePVY4NVpraYv/X7k929z6eA4LBmywvBY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)