UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bJg0h7LPcKg7s94NDpiINrBVQ+rcP+XUMlYeyaHnky4=' 
WHERE 
  key_id = '63bb6b3267a3ebfaa63a0c90b99d1d837e1cd12d3e0dad55ce27efe4bade0279' 
  AND (
    token = 'bJg0h7LPcKg7s94NDpiINrBVQ+rcP+XUMlYeyaHnky4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024